home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the Mac Game Programming Gurus
/
TricksOfTheMacGameProgrammingGurus.iso
/
More Source
/
Pascal
/
OneTest
/
Main.p
next >
Wrap
Text File
|
1994-10-29
|
861b
|
38 lines
{Main program for OneTest. See OneEvents.p for comments. This unit initializes OneEvents and everything else,}
{and calls the event handler until we finish. A real program should probably call your own separate init procedures.}
program OneTest;
uses
{$ifc undefined THINK_PASCAL}
Types, QuickDraw, Events, Windows, Dialogs, Fonts, DiskInit, TextEdit, Traps, Desk, Memory,{}
SegLoad, Scrap, ToolUtils, OSEvents, OSUtils, Menus, Resources, StandardFile, GestaltEqu, Files,{}
Errors, {}
{$endc}
OneEvents, StdHandlerStubs;
var
m: MenuHandle;
w: WindowPtr;
begin
{Init OneEvents}
OneInit('About OneTest…');
{Init my own stuff}
m := GetMenu(128);
InsertMenu(m, 0);
DrawMenuBar;
if gHasCQD then
w := GetNewCWindow(128, nil, WindowPtr(-1))
else
w := GetNewWindow(128, nil, WindowPtr(-1));
{Run}
repeat
PollEvents
until gDone;
end.